import layout from "@/layout/";

const meta = {auth: true};

export default {
    path: "/hall",
    name: "hall",
    meta,
    redirect: {name: "hall-index"},
    component: layout,
    children: (pre => [
        {
            path: "index",
            name: `${pre}index`,
            component: () => import("@/pages/hall/index"),
            meta: {
                shareData: {
                    title: '树洞-健蓓医疗',
                    desc: "向你分享了聊天室",
                    link: location.href,
                    imgUrl: 'https://img.yzcdn.cn/upload_files/2018/12/04/Fs2MKthTfft2XLKQbxIP98sTO5VH.jpg'
                },
                title: '聊天大厅',
                ...meta
            },
            children: [
                {
                    path: "room-create",
                    name: `hall-room-create`,
                    component: () => import("@/pages/hall/create"),
                    meta: {...meta, title: "创建聊天室"}
                },
                {
                    path: "room/:id",
                    name: "hall-room",
                    component: () => import("@/pages/hall/room"),
                    meta: {...meta, title: "聊天室"},
                    children: [
                        {
                            path: "room-info/:id",
                            name: "hall-room-info",
                            component: () => import("@/pages/hall/RoomInfo"),
                            meta: {...meta, title: "聊天室"}
                        }
                    ]
                }
            ]
// -
        }
    ])
    ("hall-")
}
;
